home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / scrptngd.hqx / Script Manager / background_2848.xml next >
Extensible Markup Language  |  1992-05-11  |  16KB  |  359 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>2848</id>
  5.     <filler1>0</filler1>
  6.     <cantDelete> <false /> </cantDelete>
  7.     <showPict> <true /> </showPict>
  8.     <dontSearch> <false /> </dontSearch>
  9.     <link rel="stylesheet" type="text/css" href="stylesheet_9546.css" />
  10.     <part>
  11.         <id>1</id>
  12.         <type>field</type>
  13.         <visible> <true /> </visible>
  14.         <dontWrap> <false /> </dontWrap>
  15.         <dontSearch> <false /> </dontSearch>
  16.         <sharedText> <false /> </sharedText>
  17.         <fixedLineHeight> <true /> </fixedLineHeight>
  18.         <autoTab> <false /> </autoTab>
  19.         <lockText> <false /> </lockText>
  20.         <rect>
  21.             <left>5</left>
  22.             <top>114</top>
  23.             <right>136</right>
  24.             <bottom>319</bottom>
  25.         </rect>
  26.         <style>scrolling</style>
  27.         <autoSelect> <false /> </autoSelect>
  28.         <showLines> <false /> </showLines>
  29.         <wideMargins> <false /> </wideMargins>
  30.         <multipleLines> <false /> </multipleLines>
  31.         <reservedFamily> 0 </reservedFamily>
  32.         <titleWidth>0</titleWidth>
  33.         <icon>0</icon>
  34.         <textAlign>left</textAlign>
  35.         <font>Courier</font>
  36.         <textSize>12</textSize>
  37.         <textStyle>plain</textStyle>
  38.         <textHeight>16</textHeight>
  39.         <name>globals</name>
  40.         <script></script>
  41.     </part>
  42.     <part>
  43.         <id>2</id>
  44.         <type>field</type>
  45.         <visible> <true /> </visible>
  46.         <dontWrap> <false /> </dontWrap>
  47.         <dontSearch> <false /> </dontSearch>
  48.         <sharedText> <false /> </sharedText>
  49.         <fixedLineHeight> <true /> </fixedLineHeight>
  50.         <autoTab> <false /> </autoTab>
  51.         <lockText> <false /> </lockText>
  52.         <rect>
  53.             <left>137</left>
  54.             <top>114</top>
  55.             <right>266</right>
  56.             <bottom>319</bottom>
  57.         </rect>
  58.         <style>scrolling</style>
  59.         <autoSelect> <false /> </autoSelect>
  60.         <showLines> <false /> </showLines>
  61.         <wideMargins> <false /> </wideMargins>
  62.         <multipleLines> <false /> </multipleLines>
  63.         <reservedFamily> 0 </reservedFamily>
  64.         <titleWidth>0</titleWidth>
  65.         <icon>0</icon>
  66.         <textAlign>left</textAlign>
  67.         <font>Courier</font>
  68.         <textSize>12</textSize>
  69.         <textStyle>plain</textStyle>
  70.         <textHeight>16</textHeight>
  71.         <name>handlers</name>
  72.         <script></script>
  73.     </part>
  74.     <part>
  75.         <id>5</id>
  76.         <type>field</type>
  77.         <visible> <true /> </visible>
  78.         <dontWrap> <false /> </dontWrap>
  79.         <dontSearch> <false /> </dontSearch>
  80.         <sharedText> <false /> </sharedText>
  81.         <fixedLineHeight> <true /> </fixedLineHeight>
  82.         <autoTab> <false /> </autoTab>
  83.         <lockText> <true /> </lockText>
  84.         <rect>
  85.             <left>8</left>
  86.             <top>39</top>
  87.             <right>512</right>
  88.             <bottom>61</bottom>
  89.         </rect>
  90.         <style>shadow</style>
  91.         <autoSelect> <false /> </autoSelect>
  92.         <showLines> <false /> </showLines>
  93.         <wideMargins> <false /> </wideMargins>
  94.         <multipleLines> <false /> </multipleLines>
  95.         <reservedFamily> 0 </reservedFamily>
  96.         <titleWidth>0</titleWidth>
  97.         <icon>0</icon>
  98.         <textAlign>center</textAlign>
  99.         <font>Courier</font>
  100.         <textSize>14</textSize>
  101.         <textStyle>plain</textStyle>
  102.         <textHeight>18</textHeight>
  103.         <name>the Stack</name>
  104.         <script>on mouseUpAnswer "Create new card or replace this one?" with┬¼"Cancel" or "Replace" or "New"if it is "Cancel" then exit mouseUpif it is "New" then doMenu "New Card"get fileName("STAK")if it is empty then exit mouseUpput it into meend mouseup</script>
  105.     </part>
  106.     <part>
  107.         <id>6</id>
  108.         <type>button</type>
  109.         <visible> <true /> </visible>
  110.         <reserved5> 0 </reserved5>
  111.         <reserved4> 0 </reserved4>
  112.         <reserved3> 0 </reserved3>
  113.         <reserved2> 0 </reserved2>
  114.         <reserved1> 0 </reserved1>
  115.         <enabled> <true /> </enabled>
  116.         <rect>
  117.             <left>133</left>
  118.             <top>69</top>
  119.             <right>196</right>
  120.             <bottom>88</bottom>
  121.         </rect>
  122.         <style>roundrect</style>
  123.         <showName> <true /> </showName>
  124.         <highlight> <false /> </highlight>
  125.         <autoHighlight> <true /> </autoHighlight>
  126.         <sharedHighlight> <true /> </sharedHighlight>
  127.         <family>0</family>
  128.         <titleWidth>0</titleWidth>
  129.         <icon>0</icon>
  130.         <textAlign>center</textAlign>
  131.         <font>Chicago</font>
  132.         <textSize>12</textSize>
  133.         <textStyle>plain</textStyle>
  134.         <name>Check</name>
  135.         <script>on mouseUpglobal locals,stops,xternals,globs,hands,funcsput empty into globsput empty into handsput empty into funcsput empty into xternalsput empty into localsput fld "globals" of cd "knowns" into stopsput fld "the Stack" into theStakset the lockscreen to trueset the lockmessages to trueset the lockrecent to trueemptyfieldspush cardgo theStakget the script of stackCheckScript itrepeat with b = 1 to the number of bggo cd 1 of bg bget the script of bgCheckScript itrepeat with bb = 1 to the number of bg btnsget the script of bg btn bbCheckScript itend repeatrepeat with bf = 1 to the number of fldsget the script of fld bfCheckScript itend repeatend repeatrepeat with c = 1 to the number of cdsgo cd cget the script of cardCheckScript itrepeat with cb = 1 to the number of cd btnsget the script of btn cbCheckScript itend repeatrepeat with cf = 1 to the number of card fieldsget the script of cd fld cfCheckScript itend repeatend repeatpop cardput globs into fld "Globals"put empty into globsremoveDups "Globals"put hands into fld "Handlers"put empty into handsremoveDups "handlers"put funcs into fld "Functions"put empty into funcsremoveDups "Functions"put xternals into fld "Externals"put empty into xternalsremoveDups "Externals"secondPass "Externals"if the hilite of bg btn id 8 then removeSysMsgshide the msgend mouseUp</script>
  136.     </part>
  137.     <part>
  138.         <id>7</id>
  139.         <type>button</type>
  140.         <visible> <true /> </visible>
  141.         <reserved5> 0 </reserved5>
  142.         <reserved4> 0 </reserved4>
  143.         <reserved3> 0 </reserved3>
  144.         <reserved2> 0 </reserved2>
  145.         <reserved1> 0 </reserved1>
  146.         <enabled> <true /> </enabled>
  147.         <rect>
  148.             <left>211</left>
  149.             <top>61</top>
  150.             <right>457</right>
  151.             <bottom>77</bottom>
  152.         </rect>
  153.         <style>radiobutton</style>
  154.         <showName> <true /> </showName>
  155.         <highlight> <false /> </highlight>
  156.         <autoHighlight> <true /> </autoHighlight>
  157.         <sharedHighlight> <true /> </sharedHighlight>
  158.         <family>0</family>
  159.         <titleWidth>0</titleWidth>
  160.         <icon>0</icon>
  161.         <textAlign>center</textAlign>
  162.         <font>Chicago</font>
  163.         <textSize>12</textSize>
  164.         <textStyle>plain</textStyle>
  165.         <name>Include system message handlers</name>
  166.         <script>on mouseUpset the hilite of bg btn id 8 to not the hilite of meend mouseUp</script>
  167.     </part>
  168.     <part>
  169.         <id>8</id>
  170.         <type>button</type>
  171.         <visible> <true /> </visible>
  172.         <reserved5> 0 </reserved5>
  173.         <reserved4> 0 </reserved4>
  174.         <reserved3> 0 </reserved3>
  175.         <reserved2> 0 </reserved2>
  176.         <reserved1> 0 </reserved1>
  177.         <enabled> <true /> </enabled>
  178.         <rect>
  179.             <left>211</left>
  180.             <top>76</top>
  181.             <right>495</right>
  182.             <bottom>92</bottom>
  183.         </rect>
  184.         <style>radiobutton</style>
  185.         <showName> <true /> </showName>
  186.         <highlight> <true /> </highlight>
  187.         <autoHighlight> <true /> </autoHighlight>
  188.         <sharedHighlight> <true /> </sharedHighlight>
  189.         <family>0</family>
  190.         <titleWidth>0</titleWidth>
  191.         <icon>0</icon>
  192.         <textAlign>center</textAlign>
  193.         <font>Chicago</font>
  194.         <textSize>12</textSize>
  195.         <textStyle>plain</textStyle>
  196.         <name>DonΓÇÖt include system message handlers</name>
  197.         <script>on mouseUpset the hilite of bg btn id 7 to not the hilite of meend mouseUp</script>
  198.     </part>
  199.     <part>
  200.         <id>12</id>
  201.         <type>field</type>
  202.         <visible> <true /> </visible>
  203.         <dontWrap> <false /> </dontWrap>
  204.         <dontSearch> <false /> </dontSearch>
  205.         <sharedText> <false /> </sharedText>
  206.         <fixedLineHeight> <true /> </fixedLineHeight>
  207.         <autoTab> <false /> </autoTab>
  208.         <lockText> <true /> </lockText>
  209.         <rect>
  210.             <left>267</left>
  211.             <top>114</top>
  212.             <right>393</right>
  213.             <bottom>319</bottom>
  214.         </rect>
  215.         <style>scrolling</style>
  216.         <autoSelect> <false /> </autoSelect>
  217.         <showLines> <false /> </showLines>
  218.         <wideMargins> <false /> </wideMargins>
  219.         <multipleLines> <false /> </multipleLines>
  220.         <reservedFamily> 0 </reservedFamily>
  221.         <titleWidth>0</titleWidth>
  222.         <icon>0</icon>
  223.         <textAlign>left</textAlign>
  224.         <font>Courier</font>
  225.         <textSize>12</textSize>
  226.         <textStyle>plain</textStyle>
  227.         <textHeight>16</textHeight>
  228.         <name>Functions</name>
  229.         <script></script>
  230.     </part>
  231.     <part>
  232.         <id>14</id>
  233.         <type>button</type>
  234.         <visible> <true /> </visible>
  235.         <reserved5> 0 </reserved5>
  236.         <reserved4> 0 </reserved4>
  237.         <reserved3> 0 </reserved3>
  238.         <reserved2> 0 </reserved2>
  239.         <reserved1> 0 </reserved1>
  240.         <enabled> <true /> </enabled>
  241.         <rect>
  242.             <left>178</left>
  243.             <top>320</top>
  244.             <right>207</right>
  245.             <bottom>341</bottom>
  246.         </rect>
  247.         <style>transparent</style>
  248.         <showName> <false /> </showName>
  249.         <highlight> <false /> </highlight>
  250.         <autoHighlight> <false /> </autoHighlight>
  251.         <sharedHighlight> <true /> </sharedHighlight>
  252.         <family>0</family>
  253.         <titleWidth>0</titleWidth>
  254.         <icon>30557</icon>
  255.         <textAlign>center</textAlign>
  256.         <font>Chicago</font>
  257.         <textSize>12</textSize>
  258.         <textStyle>plain</textStyle>
  259.         <name></name>
  260.         <script>on mouseUpgo cd 1end mouseUp</script>
  261.     </part>
  262.     <part>
  263.         <id>15</id>
  264.         <type>button</type>
  265.         <visible> <true /> </visible>
  266.         <reserved5> 0 </reserved5>
  267.         <reserved4> 0 </reserved4>
  268.         <reserved3> 0 </reserved3>
  269.         <reserved2> 0 </reserved2>
  270.         <reserved1> 0 </reserved1>
  271.         <enabled> <true /> </enabled>
  272.         <rect>
  273.             <left>228</left>
  274.             <top>319</top>
  275.             <right>254</right>
  276.             <bottom>342</bottom>
  277.         </rect>
  278.         <style>transparent</style>
  279.         <showName> <false /> </showName>
  280.         <highlight> <false /> </highlight>
  281.         <autoHighlight> <false /> </autoHighlight>
  282.         <sharedHighlight> <true /> </sharedHighlight>
  283.         <family>0</family>
  284.         <titleWidth>0</titleWidth>
  285.         <icon>1014</icon>
  286.         <textAlign>center</textAlign>
  287.         <font>Chicago</font>
  288.         <textSize>12</textSize>
  289.         <textStyle>plain</textStyle>
  290.         <name>Prev</name>
  291.         <script>on mouseUpvisual effect wipe rightgo to prev cardend mouseUp</script>
  292.     </part>
  293.     <part>
  294.         <id>16</id>
  295.         <type>button</type>
  296.         <visible> <true /> </visible>
  297.         <reserved5> 0 </reserved5>
  298.         <reserved4> 0 </reserved4>
  299.         <reserved3> 0 </reserved3>
  300.         <reserved2> 0 </reserved2>
  301.         <reserved1> 0 </reserved1>
  302.         <enabled> <true /> </enabled>
  303.         <rect>
  304.             <left>256</left>
  305.             <top>319</top>
  306.             <right>281</right>
  307.             <bottom>342</bottom>
  308.         </rect>
  309.         <style>transparent</style>
  310.         <showName> <false /> </showName>
  311.         <highlight> <false /> </highlight>
  312.         <autoHighlight> <false /> </autoHighlight>
  313.         <sharedHighlight> <true /> </sharedHighlight>
  314.         <family>0</family>
  315.         <titleWidth>0</titleWidth>
  316.         <icon>1013</icon>
  317.         <textAlign>center</textAlign>
  318.         <font>Chicago</font>
  319.         <textSize>12</textSize>
  320.         <textStyle>plain</textStyle>
  321.         <name>Next</name>
  322.         <script>on mouseUpvisual wipe leftgo to next cardend mouseUp</script>
  323.     </part>
  324.     <part>
  325.         <id>3</id>
  326.         <type>field</type>
  327.         <visible> <true /> </visible>
  328.         <dontWrap> <false /> </dontWrap>
  329.         <dontSearch> <false /> </dontSearch>
  330.         <sharedText> <false /> </sharedText>
  331.         <fixedLineHeight> <true /> </fixedLineHeight>
  332.         <autoTab> <false /> </autoTab>
  333.         <lockText> <false /> </lockText>
  334.         <rect>
  335.             <left>394</left>
  336.             <top>114</top>
  337.             <right>511</right>
  338.             <bottom>319</bottom>
  339.         </rect>
  340.         <style>scrolling</style>
  341.         <autoSelect> <false /> </autoSelect>
  342.         <showLines> <false /> </showLines>
  343.         <wideMargins> <false /> </wideMargins>
  344.         <multipleLines> <false /> </multipleLines>
  345.         <reservedFamily> 0 </reservedFamily>
  346.         <titleWidth>0</titleWidth>
  347.         <icon>0</icon>
  348.         <textAlign>left</textAlign>
  349.         <font>Courier</font>
  350.         <textSize>12</textSize>
  351.         <textStyle>plain</textStyle>
  352.         <textHeight>16</textHeight>
  353.         <name>externals</name>
  354.         <script>on mouseUpset the locktext of me to falseclick at the clicklocclick at the clicklocif the selection is empty then cleanExitselect the selectedlineif char 1 of the selection is "ΓÇó" then cleanExitselect before the selectedlinetype "ΓÇó"set the locktext of me to trueend mouseUpon cleanExitset the locktext of me to trueexit to HyperCardend cleanExit</script>
  355.     </part>
  356.     <name></name>
  357.     <script>on removeSysMsgsrepeat with l = the number of lines in fld "Handlers" down to 1set the cursor to busyget line l of fld "Handlers"if it & return is in fld "Handlers" of cd "Knowns" thendelete line l of fld "Handlers"end ifend repeatend removeSysMsgson CollectUnknowns theLineglobal locals,stops,xternals,globs,hands,funcsrepeat with w = 1 to the number of words in theLineset the cursor to busyget word w of theLineif it contains quote then next repeatif it is "into" thenadd 1 to wput word w of theLine & return after localsexit repeatend ifif it is "with" thenadd 1 to wput word w  of theLine & return after localsadd 3 to wnext repeatend ifif ItIsANumber(it) then next repeatif (char 1 to 2 of it is "-"&"-") then exit repeatif char 1 of it is "(" then delete char 1 of itif last char of it is ")" then delete last char of itrepeat until offset ("(",it) = 0put return into char offset("(",it) of itend repeatput return after itif it is in stops then next repeatelse put it after xternalsend repeatend CollectUnknownsfunction ItIsANumber aWordrepeat with c = 1 to the number of chars in aWordif char c of aWord is not in "1234567890." then return falseend repeatreturn trueend ItIsANumberon emptyFieldsput empty into fld "handlers"put empty into fld "globals"put empty into fld "externals"put empty into fld "functions"end emptyFieldson removeDups aFielddelete last char of fld aField -- the return charput sortLines(fld aField) into fld aFieldrepeat with i = the number of lines in fld aField down to 2set the cursor to busyif line i of fld aField =line i-1 of fld aField thendelete line i of fld aFieldend ifend repeatput return after fld aFieldend removeDupsfunction Capitalize aWordput LowerToUpper(char 1 of aWord) into char 1 of aWordreturn aWordend Capitalizeon CheckScript aScriptput the number of lines in aScript into Linenumrepeat with i = 1 to Linenumput LineNum - iput line i of aScript into theLineif char 1 to 2 of word 1 of theLine is "-"&"-" then next repeatif word 1 of theLine is "end" then next repeatif word 1 of theLine is "on" thenaddHandler theLineelse if word 1 of theLine is "function" thenaddFunction theLineelse if word 1 of theLine is "global" thenAddGlobals theLineelseput spacePad(theLine) into theLineCollectUnknowns theLineend ifend repeatend CheckScriptfunction spacepad aLinerepeat with c = the number of chars in aLine down to 1set the cursor to busyif char c of aLine is in "-=+*/┬¼" thenput space after char c of aLineput space before char c of aLineend ifend repeatreturn aLineend spacePadon SecondPass aFieldglobal localsrepeat with l = the number of lines in fld aField down to 1get line l of fld aFieldput return after itif it is in fld "Globals" then delete line l of fld aFieldelse if it is in fld "Functions" then delete line l of fld aFieldelse if it is in fld "Handlers" then delete line l of fld aFieldelse if it is in locals then delete line l of fld aFieldelse if it is in fld "globals" of cd "Knowns" then delete┬¼line l of fld aFieldend repeatend SecondPasson AddFunction Alineglobal locals,stops,xternals,globs,hands,funcsput word 3 of ALine into paramsput Capitalize(word 2 of Aline) & return after funcsAddLocals paramsend AddFunctionon AddLocals paramsglobal locals,stops,xternals,globs,hands,funcsrepeat with i = 1 to the number of items in paramsput (item i of params) & return after localsend repeatend AddLocalson AddGlobals Alineglobal locals,stops,xternals,globs,hands,funcsput word 2 of Aline into theGlobalsrepeat with i = 1 to the number of items in theGlobalsput Capitalize(item i of theGlobals) & return after globsend repeatend AddGlobalson AddHandler Alineglobal locals,stops,xternals,globs,hands,funcsput word 3 of ALine into paramsaddLocals paramsput word 2 of Aline & return into theWordput Capitalize(theWord) after handsend AddHandlerfunction ThereInFull theword,aListif theWord is in aList thenrepeat with i = 1 to the number of lines in aListif theword is line i of aList then return trueend repeatend ifreturn falseend ThereInFull</script>
  358. </background>
  359.